﻿<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>产品中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> -->
    <link rel="stylesheet" type="text/css" href="${ctxPath}/static/css/style.css">
    <script type="text/javascript" src="${ctxPath}/static/js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="${ctxPath}/static/js/project.js"></script>
    <script type="text/javascript">
        $(function(){
            $(".product-center-wrap dl a dt.preview").preview();
        });
    </script>
</head>
<body>
<form action="" method="post" id="form" name="form">
	<input type="hidden" id="pageNum" name="pageNum">
</form>
<input type="hidden" id="fnmod" value="product_center">
<div class="header_bg">
    <div class="header">
        <div class="logo"><a href="${ctxPath}/webHome/index"><img src="${ctxPath}/static/images/index/logo.jpg" alt=""></a></div>
        <div class="title">
            <ul>
                <li><a href="${ctxPath}/webHome/index">首页</a></li>
                <li><a href="${ctxPath}/webProduct/nidex">产品中心</a>
                    <div class="product_list" >
                        <ul>
                            <li><a href="${ctxPath}/webProduct/index">所有产品</a></li>
                            <!--# for(var type in productType){ -->
			                    <li><a href="${ctxPath}/webProduct/index?typeId=${type.id!}&typeName=${type.type_name!}">${type.type_name!}</a></li>
		                    <!--# } -->
                        </ul>
                    </div>
                </li>
                <li><a href="${ctxPath}/webNews/nidex">新闻动态</a></li>
                <li><a href="${ctxPath}/webAbout/index">关于我们</a></li>
                <li><a href="${ctxPath}/webContact/index">联系我们</a></li>
            </ul>
        </div>
        <div style="clear: both;"></div>
    </div>
</div>
<div style="clear: both;"></div>
<div class="main">
	<!--# if(typeName! != null){ -->
		<div class="title-list-name"><p>${typeName!}</p></div>
	<!--# }else{ -->
		<div class="title-list-name"><p>所有产品</p></div>
	<!--# } -->
    <div class="product-wrap">
        <div class="product-center-wrap">
	        <!--# for(var product in productList){ -->
		        <dl>
		        	<a href="${ctxPath}/webProduct/productDetail?id=${product.id!}" target="_blank">
			        	<dt class="preview" href="${ctxPath}/downImg/downProductImg?imgUrl=${product.big_img!}">
			        		<img src="${ctxPath}/downImg/downProductImg?imgUrl=${product.small_img!}" width="100%" height="100%" alt="${product.product_name!}">
			        	</dt>
			        	<dd>${product.product_name!}</dd>
		        	</a>
		        </dl>
	        <!--# } -->
        </div>
        <div style="clear: both;"></div>
        <div class="page">
            <a class="last" onclick="paging('sub')">上一页</a>
	        <!--# for(var i=0; i<totalPage.Pcount!; i++){ -->
	        	<!--# if(totalPage.Pcount! == 1){ -->
	        		<a class="on" >${i+1}</a>
	        	<!--# }else{ -->
	        		<a class="on" onclick="paging('${i+1}')">${i+1}</a>
	        	<!--# } -->
	        <!--# } -->
	        <a class="last next" onclick="paging('add')">下一页</a>
        </div>
    </div>
</div>
<div style="clear: both;"></div>
<!--<div class="top"></div>-->
<div class="footer">
    版权信息
</div>
<script type="text/javascript">
	function paging(type){
		var pageNum = '${pageNum!}';
		var totalPage = '${totalPage.Pcount!}';
		console.log(pageNum);
		if(type == 'add'){
			if(Number(pageNum) >= totalPage){
				return;
			}else{
				pageNum = Number(pageNum)+1;
			}
		}else if(type == 'sub'){
			if(pageNum == '1'){
				return
			}else{
				pageNum = Number(pageNum)-1;
			}
		}else{
			pageNum = type;
		}
		$("#pageNum").val(pageNum);
		$("#form").submit();
	}
	
</script>
</body>
</html>